﻿package com.leebrimelow.ui{	import flash.display.*;	import flash.events.*;	import com.leebrimelow.ui.*;	import caurina.transitions.*;		public class ScrollBox extends MovieClip	{		/* The ScrollBox needs to contain the following items:			"content" - MovieClip with the content to be scrolled			"masker" - MovieClip that masks the container clip			"sb" - com.leebrimelow.ui.ScrollBar instance		*/				public var speed:Number;				public function ScrollBox():void		{			speed = 1;			sb.addEventListener(ScrollBarEvent.VALUE_CHANGED, onChange);		}		private function onChange(e:ScrollBarEvent):void		{			Tweener.addTween(content, 							 {y:(-e.scrollValue * (content.height - masker.height + 10)), 							 time:speed});		}	}}